package cn.jly.spring.annotation.ioc.config;

import cn.jly.spring.annotation.ioc.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @author lanyangji
 * @description 属性赋值相关配置类
 * @date 2020/11/13 上午 9:40
 */
@Configuration
@ComponentScan(basePackages = {"cn.jly.spring.annotation.ioc.bean"})
@PropertySource("classpath:student.properties")
public class MainConfigOfPropertyValue {

    @Bean
    public Person person() {
        return new Person("tom", 23);
    }
}
